<?php
namespace Admin\Model;
use Think\Model\RelationModel;
class GoodsModel extends RelationModel {
     protected $_link = array(         
           'goods_img'  =>  array(             
            'mapping_type'      => self::HAS_MANY ,  //关联表之间的关系          
            'class_name'        => 'goods_img', //要关联的附表
            'foreign_key'       =>'goods_id',//关联条件
            // 'mapping_fields'    =>'name',

                 ),         
            
            );


   }